package ch.trackedbean.server.data.to;

import java.util.*;
import ch.trackedbean.copier.annotations.*;
import ch.trackedbean.loaders.lazy.*;
import ch.trackedbean.server.data.dom.*;
import ch.trackedbean.validator.annotations.*;

@SourceClass(PersonDom.class)
public class PersonTO extends PersonShort {
    /**
     * Comment for <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -4182666304040040030L;

    /**
     * Property constant for {@link #getPicture()}/{@link #setPicture(byte[])}. Type {@link byte[]}.
     */
    public static final String ATTR_PICTURE = "picture";

    /**
     * Property constant for {@link #getAddresses()}/{@link #setAddresses(List<AddressTO>)}. Type {@link List<AddressTO>}.
     */
    public static final String ATTR_ADDRESSES = "addresses";

    @DeepValidation
    @CollectionMapping(dstType = AddressTO.class)
    private List<AddressTO> addresses;

    private byte[] picture;

    /**
     * @return Returns the addresses.
     */
    public List<AddressTO> getAddresses() {
        return addresses;
    }

    /**
     * @param addresses The addresses to set.
     */
    public void setAddresses(List<AddressTO> addresses) {
        this.addresses = addresses;
    }

    /**
     * @return Returns the picture.
     */
    @LoadLazy
    public byte[] getPicture() {
        return picture;
    }

    /**
     * @param picture The picture to set.
     */
    public void setPicture(byte[] picture) {
        this.picture = picture;
    }
}
